Skip to content

[RemoteInspection] Handle special case of large amount of ELF sections. #83582

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

augusto2112
Copy link
Contributor

When parsing ELF, reading the number of sections needs special handling.

From the elf man page:

          If the number of entries in the section header table is
          larger than or equal to SHN_LORESERVE (0xff00), e_shnum
          holds the value zero and the real number of entries in the
          section header table is held in the sh_size member of the
          initial entry in section header table.  Otherwise, the
          sh_size member of the initial entry in the section header
          table holds the value zero.

When parsing ELF, reading the number of sections needs special handling.

From the elf man page:

              If the number of entries in the section header table is
              larger than or equal to SHN_LORESERVE (0xff00), e_shnum
              holds the value zero and the real number of entries in the
              section header table is held in the sh_size member of the
              initial entry in section header table.  Otherwise, the
              sh_size member of the initial entry in the section header
              table holds the value zero.
@augusto2112
Copy link
Contributor Author

@swift-ci smoke test

@augusto2112 augusto2112 requested a review from tbkka August 7, 2025 03:34
@tshortli
Copy link
Contributor

tshortli commented Aug 7, 2025

@swift-ci smoke test macOS

@augusto2112 augusto2112 requested a review from mikeash August 11, 2025 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants